package com.only4play.portal.cp.message;

import com.only4play.portal.common.session.PortalSessionManager;
import com.only4play.portal.cp.api.CpService;
import com.only4play.portal.cp.bean.message.AbstractCpMessage;
import com.only4play.portal.cp.bean.message.AbstractCpOutMessage;

import java.util.Map;

/**
 * @author liyuncong
 * @version 1.0
 * @file PortalCpMessageHandler
 * @brief PortalCpMessageHandler
 * @details 处理推送消息的处理器接口
 * @date 2024-06-07
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-06-07               liyuncong          Created
 */
public interface CpMessageHandler<CpOutMessage extends AbstractCpOutMessage, CpMessage extends AbstractCpMessage> {

    CpOutMessage handle(
        CpMessage cpMessage,
        Map<String, Object> context,
        CpService portalCpService,
        PortalSessionManager sessionManager
    );
}
